

<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <ul class="sidebar-menu">
            <li class="header">Main</li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-dashboard"></i> <span>面板</span> <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li><a href="index.php?p=dashboard"><i class="fa fa-circle-o"></i>查看</a></li>
                </ul>
            </li>

            <li class="treeview">
                <a href="#">
                    <i class="fa fa-video-camera"></i> <span>视频</span> <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li  class="active"><a href="index.php?p=video_list"><i class="fa fa-circle-o"></i>查看</a></li>
                    <li ><a href="index.php?p=video_add"><i class="fa fa-circle-o"></i>添加</a></li>
                </ul>
            </li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-gears"></i> <span>类型</span> <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li class="active"><a href="index.php?p=category_list"><i class="fa fa-circle-o"></i>查看</a></li>
                    <li><a href="index.php?p=category_add"><i class="fa fa-circle-o"></i>添加</a></li>
                </ul>
            </li>
            <li class="active treeview">
                <a href="#">
                    <i class="fa fa-adn"></i> <span>广告</span> <i class="fa fa-angle-left pull-right"></i>
                </a>
                <ul class="treeview-menu">
                    <li  class="active"><a href="index.php?p=ad_list"><i class="fa fa-circle-o"></i>查看</a></li>
                    <li><a href="index.php?p=ad_add"><i class="fa fa-circle-o"></i>添加</a></li>
                </ul>
            </li>
        </ul>
    </section>
    <!-- /.sidebar -->
</aside>

<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <div class="row form-group">
            <h1>
                广告列表
                <small>查看</small>
            </h1>
        </div>
        <div class="row">
            <div class="col-md-3">
                <select class="form-control" id="ad-search">
                    <option  selected="true" value="">全部类别</option>
                    <?php
                                $rows = $mysql->query("select * from `ad_type`");
                    foreach($rows as $row){
                    echo "<option value=".$row['id'].">".$row['name']."</option>";
                    }
                    ?>
                </select>
            </div>
            <div class="col-md-3">
                <h4 id="ad-num"></h4>
            </div>
        </div>
    </section>

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-body">
                        <div class="table-responsive">
                            <table id="admin-table" class="table table-bordered table-hover table-condensed">
                                <thead>
                                <tr>
                                    <th>类别id</th>
                                    <th>广告标题</th>
                                    <th>广告详情</th>
                                    <th>广告链接</th>
                                    <th>广告图片</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody id="adTable">

                                </tbody>
                            </table>
                        </div>
                    </div><!-- /.box-body -->
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.row -->
        <div class="row">
            <div class="col-xs-6">
                <nav>
                    <ul class="pagination ad-pagination">
                        <li>
                            <a href="#" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                        <li><a href="#" id="page-current">1</a></li>
                        <li>
                            <a href="#" aria-label="Next">
                                <span aria-hidden="true">&raquo;</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
        </div>

    </section><!-- /.Left col -->
</div><!-- /.row (main row) -->

<div class="modal ad-edit-model">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close ad-edit-model-close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">修改广告</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <div class="form-group">
                        <label for="update_ad_type" class="col-sm-2 control-label">类别</label>
                        <div class="col-sm-10">
                            <select name="" id="update_ad_type">
                                <?php
                                             $rows=$mysql->query("select * from `ad_type` order by id ASC");
                                foreach($rows as $row){
                                echo "<option value='".$row['id']."'>".$row['name']."</option>";
                                }

                                ?>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="update_ad_title" class="col-sm-2 control-label">广告标题</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" id="update_ad_title"
                                   placeholder="无">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="update_ad_detail" class="col-sm-2 control-label">广告详情</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="update_ad_detail"
                                   placeholder="无">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="update_ad_url" class="col-sm-2 control-label">url</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="update_ad_url"
                                   placeholder="无内容，请用汉字逗号，隔开">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="update_ad_img_url" class="col-sm-2 control-label">广告图片地址</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="update_ad_img_url"
                                   placeholder="无">
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default pull-left ad-edit-model-close" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary update-ad">保存修改</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->


